package club.janna.jrpc.rpc;

import lombok.Data;

import java.io.Serializable;

/**
 * @author Panbo.Guo
 */
@Data
public class RPCResponse<T> implements Serializable {

    /**
     * 响应的id
     */
    private int id;

    /**
     * 状态
     */
    private Status status;

    /**
     * 结果
     */
    private T result;

    /**
     * 异常
     */
    private Throwable throwable;

    public enum Status {
        SUCCESS, FAIL, ERROR;
    }
}
